package com.niknik.woody.core.room;

import com.google.inject.Inject;
import com.niknik.woody.core.ServerToClientTransmitter;

/**
 * User: yoda
 * Date: 30.01.11
 * Time: 4:22
 */
public abstract class Game {

  @Inject private ServerToClientTransmitter serverToClientTransmitter;

  private Room room;

  public abstract void move(String playerId, String move)
      throws GameEx;

  final protected void publish(String data, String playerId) {
    serverToClientTransmitter.publish(room.getId(), playerId, data);
  }

  public String getDescription() {
    return "1 / 3;description";
  }

  final void setRoom(Room room) {
    this.room = room;
  }
}
